package com.cn.xiaonuo.slbfinances.stockcontrol.controller;

import com.cn.xiaonuo.common.entity.BusinessMessage;
import com.cn.xiaonuo.slbfinances.stockcontrol.param.SlShopStockControlParam;
import com.cn.xiaonuo.slbfinances.stockcontrol.param.SlStoreInventoryTotalParam;
import com.cn.xiaonuo.slbfinances.stockcontrol.service.FactoryStockControlService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: luyangyang
 * @CreateTime: 2023-01-11  15:10
 * @Description: 供应商库存类
 */
@RestController
public class FactoryStockController {
    @Autowired
    FactoryStockControlService factoryStockControlService;
    /**
     * 供应商库存查询
     */
    @ApiOperation(value = "供应商库存查询", notes = "供应商库存查询")
    @PostMapping("/api/factoryStock/queryPage")
    public BusinessMessage queryPage(@RequestBody SlStoreInventoryTotalParam param){
        BusinessMessage message = factoryStockControlService.queryPage(param);
        return message;
    }

    /**
     * 供应商库存查询
     */
    @ApiOperation(value = "供应商出库明细", notes = "供应商出库明细")
    @PostMapping("/api/factoryStock/queryDetail")
    public BusinessMessage queryDetail(@RequestBody SlShopStockControlParam slShopStockControlParam){
        BusinessMessage message = factoryStockControlService.queryDetail(slShopStockControlParam);
        return message;
    }
}
